package o;

import android.graphics.Matrix;
import android.graphics.Path;
import android.graphics.RectF;
import com.google.android.material.internal.Experimental;
import java.util.ArrayList;
import java.util.List;

@Experimental("The shapes API is currently experimental and subject to change")
public class asp {
    public float ˊ;
    private final List<c> ˋ = new ArrayList();
    public float ˎ;
    public float ˏ;
    public float ॱ;

    public static abstract class c {
        protected final Matrix ʼ = new Matrix();

        public abstract void ˋ(Matrix matrix, Path path);
    }

    public static class b extends c {
        private float ˊ;
        private float ˏ;

        public void ˋ(Matrix matrix, Path path) {
            Matrix matrix2 = this.ʼ;
            matrix.invert(matrix2);
            path.transform(matrix2);
            path.lineTo(this.ˏ, this.ˊ);
            path.transform(matrix);
        }
    }

    public static class d extends c {
        private static final RectF ॱॱ = new RectF();
        public float ʽ;
        public float ˊ;
        public float ˋ;
        public float ˎ;
        public float ˏ;
        public float ॱ;

        public d(float f, float f2, float f3, float f4) {
            this.ˏ = f;
            this.ˊ = f2;
            this.ˋ = f3;
            this.ˎ = f4;
        }

        public void ˋ(Matrix matrix, Path path) {
            Matrix matrix2 = this.ʼ;
            matrix.invert(matrix2);
            path.transform(matrix2);
            ॱॱ.set(this.ˏ, this.ˊ, this.ˋ, this.ˎ);
            path.arcTo(ॱॱ, this.ॱ, this.ʽ, false);
            path.transform(matrix);
        }
    }

    public asp() {
        ˊ(0.0f, 0.0f);
    }

    public void ˊ(float f, float f2) {
        this.ॱ = f;
        this.ˏ = f2;
        this.ˎ = f;
        this.ˊ = f2;
        this.ˋ.clear();
    }

    public void ˋ(float f, float f2) {
        b bVar = new b();
        bVar.ˏ = f;
        bVar.ˊ = f2;
        this.ˋ.add(bVar);
        this.ˎ = f;
        this.ˊ = f2;
    }

    public void ॱ(float f, float f2, float f3, float f4, float f5, float f6) {
        d dVar = new d(f, f2, f3, f4);
        dVar.ॱ = f5;
        dVar.ʽ = f6;
        this.ˋ.add(dVar);
        this.ˎ = ((f + f3) * 0.5f) + (((f3 - f) / 2.0f) * ((float) Math.cos(Math.toRadians((double) (f5 + f6)))));
        this.ˊ = ((f2 + f4) * 0.5f) + (((f4 - f2) / 2.0f) * ((float) Math.sin(Math.toRadians((double) (f5 + f6)))));
    }

    public void ˏ(Matrix matrix, Path path) {
        int size = this.ˋ.size();
        for (int i = 0; i < size; i++) {
            ((c) this.ˋ.get(i)).ˋ(matrix, path);
        }
    }
}
